// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router/router'
import VueRouter from 'vue-router'
import ElementUI from 'element-ui'
import axios from '../config/http'
import store from './store/store'
import VueAMap from 'vue-amap';
import 'element-ui/lib/theme-chalk/index.css'
import '../src/assets/resert.css'
import VueLazyload from 'vue-lazyload'

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(VueRouter)
Vue.use(VueAMap);
Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: 'dist/error.png',
  loading: 'static/images/preload.png',
  attempt: 1
})

/* eslint-disable no-new */
// const router = new VueRouter({
//   mode: 'history',
//   routers
// })
VueAMap.initAMapApiLoader({
  key: 'e6d21f9bc71dd2985a83e9d7c1a511fb',
  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch','AMap.Geolocation', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
  // 默认高德 sdk 版本为 1.4.4
  v: '1.4.4'
});
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
